<?php namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class Windows extends Model {
	use SoftDeletes;
	protected $table = 'windows';
	protected $dates = ['deleted_at'];
	protected $guarded = ['id'];

	public function tag()
    {
        return $this->morphToMany('App\Models\Tag', 'taggable');
    }

    public function admin()
    {
        return $this->belongsTo('App\Models\Admin', 'admin_id','id');
    }

    public function windows_type()
    {
        return $this->belongsTo('App\Models\Windows_type','type_id','id');
    }

    public function pwindows_type()
    {
        return $this->belongsTo('App\Models\Windows_type','ptype_id','id');
    }

}
